<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Box2D APi: C:/Users/ARme/Desktop/box2d/Box2D/Common/b2Settings.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Box2D APi
   &#160;<span id="projectnumber">251</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('b2_settings_8h.html','');
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">C:/Users/ARme/Desktop/box2d/Box2D/Common/b2Settings.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="b2_settings_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org</span>
<a name="l00003"></a>00003 <span class="comment">*</span>
<a name="l00004"></a>00004 <span class="comment">* This software is provided &#39;as-is&#39;, without any express or implied</span>
<a name="l00005"></a>00005 <span class="comment">* warranty.  In no event will the authors be held liable for any damages</span>
<a name="l00006"></a>00006 <span class="comment">* arising from the use of this software.</span>
<a name="l00007"></a>00007 <span class="comment">* Permission is granted to anyone to use this software for any purpose,</span>
<a name="l00008"></a>00008 <span class="comment">* including commercial applications, and to alter it and redistribute it</span>
<a name="l00009"></a>00009 <span class="comment">* freely, subject to the following restrictions:</span>
<a name="l00010"></a>00010 <span class="comment">* 1. The origin of this software must not be misrepresented; you must not</span>
<a name="l00011"></a>00011 <span class="comment">* claim that you wrote the original software. If you use this software</span>
<a name="l00012"></a>00012 <span class="comment">* in a product, an acknowledgment in the product documentation would be</span>
<a name="l00013"></a>00013 <span class="comment">* appreciated but is not required.</span>
<a name="l00014"></a>00014 <span class="comment">* 2. Altered source versions must be plainly marked as such, and must not be</span>
<a name="l00015"></a>00015 <span class="comment">* misrepresented as being the original software.</span>
<a name="l00016"></a>00016 <span class="comment">* 3. This notice may not be removed or altered from any source distribution.</span>
<a name="l00017"></a>00017 <span class="comment">*/</span>
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <span class="preprocessor">#ifndef B2_SETTINGS_H</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define B2_SETTINGS_H</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;cassert&gt;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;cmath&gt;</span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="preprocessor">#define B2_NOT_USED(x) ((void)(x))</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define b2Assert(A) assert(A)</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
<a name="l00028"></a>00028 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">char</span>     int8;
<a name="l00029"></a>00029 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">short</span> int16;
<a name="l00030"></a>00030 <span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">int</span> int32;
<a name="l00031"></a>00031 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> uint8;
<a name="l00032"></a>00032 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> uint16;
<a name="l00033"></a>00033 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> uint32;
<a name="l00034"></a>00034 <span class="keyword">typedef</span> <span class="keywordtype">float</span> float32;
<a name="l00035"></a>00035 <span class="keyword">typedef</span> <span class="keywordtype">double</span> float64;
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 <span class="preprocessor">#define b2_maxFloat             FLT_MAX</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define b2_epsilon              FLT_EPSILON</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define b2_pi                   3.14159265359f</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span>
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 <span class="comment">// Collision</span>
<a name="l00046"></a>00046 
<a name="l00049"></a><a class="code" href="b2_settings_8h.html#aa5f44cc9edf711433dea2b2ec94f3c42">00049</a> <span class="preprocessor">#define b2_maxManifoldPoints    2</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span>
<a name="l00053"></a><a class="code" href="b2_settings_8h.html#a09d71ee1993bee28b5b2e6d893b41884">00053</a> <span class="preprocessor">#define b2_maxPolygonVertices   8</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span>
<a name="l00058"></a><a class="code" href="b2_settings_8h.html#adb86e231496fdd6ac7795ce58d40c870">00058</a> <span class="preprocessor">#define b2_aabbExtension                0.1f</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span>
<a name="l00063"></a><a class="code" href="b2_settings_8h.html#a7d1bd1594f20601d4079bccbd0a6a03c">00063</a> <span class="preprocessor">#define b2_aabbMultiplier               2.0f</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span>
<a name="l00067"></a><a class="code" href="b2_settings_8h.html#a57268ade379c5c3373d0ff558b0350cf">00067</a> <span class="preprocessor">#define b2_linearSlop                   0.005f</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span>
<a name="l00071"></a><a class="code" href="b2_settings_8h.html#a67810fb101bb7a7e0b3afc14845383ee">00071</a> <span class="preprocessor">#define b2_angularSlop                  (2.0f / 180.0f * b2_pi)</span>
<a name="l00072"></a>00072 <span class="preprocessor"></span>
<a name="l00076"></a><a class="code" href="b2_settings_8h.html#afc0f934dabffb1e83e081249133ad860">00076</a> <span class="preprocessor">#define b2_polygonRadius                (2.0f * b2_linearSlop)</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span>
<a name="l00079"></a><a class="code" href="b2_settings_8h.html#ac1fd56e39ab8499f344b6398b7332e55">00079</a> <span class="preprocessor">#define b2_maxSubSteps                  8</span>
<a name="l00080"></a>00080 <span class="preprocessor"></span>
<a name="l00081"></a>00081 
<a name="l00082"></a>00082 <span class="comment">// Dynamics</span>
<a name="l00083"></a>00083 
<a name="l00085"></a><a class="code" href="b2_settings_8h.html#aad3a54bcae5f7ec0235963403c2fccc9">00085</a> <span class="preprocessor">#define b2_maxTOIContacts                       32</span>
<a name="l00086"></a>00086 <span class="preprocessor"></span>
<a name="l00089"></a><a class="code" href="b2_settings_8h.html#a690b448aa2dba2a1393781f8c059c22a">00089</a> <span class="preprocessor">#define b2_velocityThreshold            1.0f</span>
<a name="l00090"></a>00090 <span class="preprocessor"></span>
<a name="l00093"></a><a class="code" href="b2_settings_8h.html#a23ab70e4809f5ee23abcd52018d5eb88">00093</a> <span class="preprocessor">#define b2_maxLinearCorrection          0.2f</span>
<a name="l00094"></a>00094 <span class="preprocessor"></span>
<a name="l00097"></a><a class="code" href="b2_settings_8h.html#a823e4f9a6fa4b9de3c97da696571400a">00097</a> <span class="preprocessor">#define b2_maxAngularCorrection         (8.0f / 180.0f * b2_pi)</span>
<a name="l00098"></a>00098 <span class="preprocessor"></span>
<a name="l00101"></a><a class="code" href="b2_settings_8h.html#af2bad257bfbafed3665df3e243ba2b52">00101</a> <span class="preprocessor">#define b2_maxTranslation                       2.0f</span>
<a name="l00102"></a>00102 <span class="preprocessor"></span><span class="preprocessor">#define b2_maxTranslationSquared        (b2_maxTranslation * b2_maxTranslation)</span>
<a name="l00103"></a>00103 <span class="preprocessor"></span>
<a name="l00106"></a><a class="code" href="b2_settings_8h.html#a5808c5f1e946205d8f7458101ccc698e">00106</a> <span class="preprocessor">#define b2_maxRotation                          (0.5f * b2_pi)</span>
<a name="l00107"></a>00107 <span class="preprocessor"></span><span class="preprocessor">#define b2_maxRotationSquared           (b2_maxRotation * b2_maxRotation)</span>
<a name="l00108"></a>00108 <span class="preprocessor"></span>
<a name="l00112"></a><a class="code" href="b2_settings_8h.html#a88e32539e0f9e69e3832e1321eba3caa">00112</a> <span class="preprocessor">#define b2_baumgarte                            0.2f</span>
<a name="l00113"></a>00113 <span class="preprocessor"></span><span class="preprocessor">#define b2_toiBaugarte                          0.75f</span>
<a name="l00114"></a>00114 <span class="preprocessor"></span>
<a name="l00115"></a>00115 
<a name="l00116"></a>00116 <span class="comment">// Sleep</span>
<a name="l00117"></a>00117 
<a name="l00119"></a><a class="code" href="b2_settings_8h.html#ab021adb740e4a5e1f5f7d9913ed94781">00119</a> <span class="preprocessor">#define b2_timeToSleep                          0.5f</span>
<a name="l00120"></a>00120 <span class="preprocessor"></span>
<a name="l00122"></a><a class="code" href="b2_settings_8h.html#a6d882c48142a8c73011b576e20dc6dd8">00122</a> <span class="preprocessor">#define b2_linearSleepTolerance         0.01f</span>
<a name="l00123"></a>00123 <span class="preprocessor"></span>
<a name="l00125"></a><a class="code" href="b2_settings_8h.html#a571f3e7c864aca14141b163205600eef">00125</a> <span class="preprocessor">#define b2_angularSleepTolerance        (2.0f / 180.0f * b2_pi)</span>
<a name="l00126"></a>00126 <span class="preprocessor"></span>
<a name="l00127"></a>00127 <span class="comment">// Memory Allocation</span>
<a name="l00128"></a>00128 
<a name="l00130"></a>00130 <span class="keywordtype">void</span>* b2Alloc(int32 size);
<a name="l00131"></a>00131 
<a name="l00133"></a>00133 <span class="keywordtype">void</span> b2Free(<span class="keywordtype">void</span>* mem);
<a name="l00134"></a>00134 
<a name="l00136"></a>00136 <span class="keywordtype">void</span> b2Log(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keywordtype">string</span>, ...);
<a name="l00137"></a>00137 
<a name="l00140"></a><a class="code" href="structb2_version.html">00140</a> <span class="keyword">struct </span><a class="code" href="structb2_version.html">b2Version</a>
<a name="l00141"></a>00141 {
<a name="l00142"></a><a class="code" href="structb2_version.html#a720da8e346364d1cb34d176125380b44">00142</a>         int32 <a class="code" href="structb2_version.html#a720da8e346364d1cb34d176125380b44" title="significant changes">major</a>;            
<a name="l00143"></a><a class="code" href="structb2_version.html#a115b8797a6e0b8e53f54502bd20d89da">00143</a>         int32 <a class="code" href="structb2_version.html#a115b8797a6e0b8e53f54502bd20d89da" title="incremental changes">minor</a>;            
<a name="l00144"></a><a class="code" href="structb2_version.html#a395cfe1434e348115d2ead3d72b88847">00144</a>         int32 <a class="code" href="structb2_version.html#a395cfe1434e348115d2ead3d72b88847" title="bug fixes">revision</a>;         
<a name="l00145"></a>00145 };
<a name="l00146"></a>00146 
<a name="l00148"></a>00148 <span class="keyword">extern</span> <a class="code" href="structb2_version.html">b2Version</a> b2_version;
<a name="l00149"></a>00149 
<a name="l00150"></a>00150 <span class="preprocessor">#endif</span>
</pre></div></div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="b2_settings_8h.html">b2Settings.h</a>      </li>

    <li class="footer">Generated on Mon Sep 17 2012 15:56:57 for Box2D APi by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.0 </li>
   </ul>
 </div>


</body>
</html>
